home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
wildcat
/
gifcat.zip
/
GIFCAT.DOC
< prev
next >
Wrap
Text File
|
1992-01-20
|
11KB
|
260 lines
Karl Schneider
8505 Woodwick Ct.
For Wildcat! 3.0x+ ONLY! Tampa, FL 33615
MS/PC-DOS 3.3 and up! 813-884-9661 voice day/eve
bbs midnite-0600 EST
Version 1.1ß (c) 1992 Karl Schneider. If you use the programs in
this package, you are requested to make a $10 contribution to the
author; this will insure support and updates. Any registration of
$25 or more will entitle you to registration on ALL my Wildcat 3.x
utilities!
GIFCAT.ZIP contains a library of GIF + WILDCAT 3.0x+ utilities which
can be used to do a number of things! Thanks to Bill Anton of The
Polar Bear's Lair BBS, 410-531-5748 for suggesting some of these util-
ities and providing some public domain C source code by Lee Daniel
Crocker, some of which has been used in creating them.
If you're currently using WCPUTGIF, you need to check this one out!
This package contains the following files:
SHOWDESC.EXE Program to display the description of any Wildcat 3x file.
KILLDESC.EXE Program to ERASE the description in any Wildcat 3x file.
WCGIFPUT.EXE Program to take the extracted description and place it,
along with the WxHxC of the .GIF file into the Wildcat!
File Description field.
SCANFILE.BAT A sample SCANFILE to automatically place this information
into UPloaded GIF files.
- - - - - -
TEST4GIF.EXE Program to Quick-test a file for proper .GIF name.
Returns ERRORLEVEL 1 if not a GIF file.
GIFDESC.EXE Program to ADD, DELETE, or EXTRACT a DESCRIPTION to, from
or in a .GIF file
MAKEGIFD.EXE Program to generate a Description to be put into a .GIF
GIFCAT.DOC This File!
PUT.BAT Sample batch file to simplify adding description to GIFs
TESTGIF.BAT Sample batch file to VIEW any Internal GIF descrips
The first 4 files, since they interface with WILDCAT 3.0x+ MUST be
EXECUTED from the WILDCAT HOME DIRECTORY. All of them support file
sharing and can be used with nodes 'up'. I suggest placing these AND
the remaining ones in your PATH so they can be executed from anywhere.
I created the first 2 programs mainly for testing out this package,
and decided to go ahead and include them, in case you may have some
use for them:
SHOWDESC example:
showdesc somefile.ext
attempts to locate 'somefile.ext' in the Wildcat Files Database, and
when (if) found, it simply displays the file name and its description.
KILLDESC example:
killdesc somefile.ext
finds 'somefile.ext', and if it is found, prints the name and descrip-
tion as above, and asks, "Erase the description y/n ?". If you enter
Y (or y), the file description will be ERASED from the Wildcat record.
Be careful with this one!
---------------------------------------------------------------------
Now for the good stuff:
You are probably familiar with the procedure for storing a File Des-
cription of a .ZIP file WITHIN the .ZIP itself (in a separate file
called DESC.SDI or FILE_ID.DIZ) and which can be extracted, for ex-
ample by my AUTODESC program, and automatically inserted into the
Wildcat 3.x file record description during the SCAN procedure follow-
ing an upload. Similar programs are in use with PcBoard and others.
This makes it easier to upload files, since you do not need to type
in descriptions while on-line, and helps keep descriptions consistent
on various boards, reducing confusion and duplication!
Now the same sort of thing can be done with .GIF files! A Description
can be 'stored' within the body of the .GIF file and then extracted
from it and inserted into the Wildcat Description automatically!
This description does NOT affect the viewing of the GIF file, and works
on "GIFLITE-ed" files as well as standard GIFs.
OK. First off, let's use the included TESTGIF.BAT to find out
what description, if any, is already IN a GIF file. Here's a copy:
@echo off
REM testgif.bat
if %1""=="" goto no_file
gifdesc -v %1
goto end
:no_file
echo ------------------
echo Bad Filename.
:end
This will ALWAYS SHOW THE Height_Width_Colors, EVEN IF THERE'S NO
STORED TEXT DESCRIPTION! The Text description, if it exists, will
be shown on a SECOND LINE.
If there's no description, let's create one that can be put into
the GIF file. We use MAKEGIFD for this. You can do this in a dir-
ectory where GIF files are located, to minimize typing in pathnames.
To use MAKEGIFD, simply execute it with a GIF filename, for example:
(assuming your current directory is the same as where the GIF is)
makegifd ramona.gif
The program will look at RAMONA.GIF, get its Width/Height/Colors and
place them into the beginning of a 'description' field. You then
simply type in a brief description. The program is very simple and
intuitive. Note that since WILDCAT only allows 60 characters in the
file description, you will be limited to (60 minus the HxWxC) of the
GIF, since this will be put into the WILDCAT description field by
WCGIFPUT later. When you finish, you will have a file called
GIFDESC.SDI, containing ONLY the TEXT that you typed in! The WxHxC
does not need to be stored, since it is already inside the GIF.
Now let's see how to put this 'description' into the .GIF file. The
program GIFDESC is used to do this. It's also used to DELETE and
EXTRACT descriptions when necessary.
If you execute GIFDESC with no arguments, you will see this:
To INSERT GIFDESC.SDI: gifdesc -a [d:\path\]gifname[.gif] gifdesc.sdi
To EXTRACT GIFDESC.SDI: gifdesc -v [d:\path\]gifname[.gif] > gifdesc.sdi
To DELETE GIFDESC.SDI: gifdesc -d [d:\path\]gifname[.gif]
[.gif] is optional. [\paths\] required if GIF in another dir.
OK, then, we want to use the FIRST option (after we have created our
GIFDESC.SDI file) and type:
gifdesc -a ramona gifdesc.sdi
Now the description is stored inside RAMONA.GIF. That's it!
-----------------------------------------------------------------------
"ARRGH...." you say, "that sounds complicated!!"
Yes you did, I heard you. Hang on a second...do it with a batch file
to make this all easier, something like PUT.BAT that looks like this:
@echo off
REM put.bat
if %1""=="" goto no_file
REM gifdesc -d %1
REM the above line can be un-REM'd to REMOVE any old description!
makegifd %1
if errorlevel 1 goto no_file
gifdesc -a %1 gifdesc.sdi
goto end
:no_file
echo
echo ------------------
echo Bad Filename.
:end
-----------------------------------------------------------------------
If you want to DELETE the description from RAMONA.GIF:
simply execute: gifdesc -d ramona
You may want to un-REM the "gifdesc -d %1" in the batch file to
first clear out any old descriptions or junk that may be inside it.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
OK, what does all this have to do with UPLOADS?
I'm glad you asked! If you're using my WCPUTGIF program, you probably
have guessed what's coming now. We are going to add commands to
our SCANFILE.BAT file to extract the HxWxC from an uploaded .GIF file
AS WELL AS THE INTERNAL DESCRIPTION (if it exists) - then we're going
to place this into the Wildcat File Record Description field for that
upload!
Here's an approximate copy of the included SCANFILE.BAT:
REM This is SCANFILE.BAT
echo off
REM you might have ZIPLAB or another gizmo here with something like
REM cd\wc30\wcwork\node1
REM wctest %1 \wc30\none\wctest.cfg
REM and so forth....
REM Our GIF package starts with the next CD command. Don't forget it!
cd \wc30
if exist gifdesc.sdi del gifdesc.sdi
test4gif %1
if errorlevel 1 goto end
REM errorlevel 1 here means it's not a .GIF file at all
gifdesc -v %1 > gifdesc.sdi
REM an errorlevel 1 here means a defective GIF header (the file's bad)
if errorlevel 1 goto bad
wcgifput %1
goto end
:bad
copy \wc30\all.ok \wc\wcwork\node%WCNODEID%\scanfile.bad
:end
Not much in here to change, except for the paths to your Wildcat
directories. If you already use other scanning utilities, it's best
to run them first, and if possible let the batch file branch to :bad
if there's a virus or whatever and save some time. Take out the
REMS if you want.
That's pretty much it! Any questions?
Q: Yeah! What does the guy uploading the file do when Wildcat asks for
its description???
A: If he has MAKEGIFD.EXE and GIFDESC.EXE and has USED them to insert
a description in the GIF file he's uploading, all he has to do is
press 'enter' when asked for Description. You may want to make
up a little .ZIP of these 2 programs plus PUT.BAT with some simple
instructions and encourage your callers to download and use them!
Q: Well, then, what if there is NO internal descrip, and he doesn't
type one in?
A: The description will contain ONLY the WxHxC of the GIF!
Q: What if he types in a description anyway and there's one stored
inside the GIF?
A: He just wastes some time...the program will over-write it with the
internally stored description.
Q: Wait a minute, I'm confused...let's say there is NO stored des-
cription in the GIF he uploads, and he DOES type in the description;
what happens then????
A: This is probably what will happen most of the time! (Until
these utilities become more widely used...I hope!) In this case,
it works just like WCPUTGIF - that is, it puts the WxHxC at the END of
the description. Yep, it OVERWRITES the last 10 or 11 characters...
like this: 640x480x256. You could end up with something like:
Wow, dudes, this is the most awesome picture of mo640x320x64
In which case the size & color is pretty much as meaningful as the
drivel he typed in....<grin>
---------------------------------------------------------------------------
This is a Beta release. It has not been THOROUGHLY tested, but it's
running on my system and Bill Anton's with no apparent problems. If
you use these programs, please understand that I make no warranty that
any of them will or will not do anything. I am fairly confident there
is no danger to any data from their use, but will not be responsible
for any consequences of using any programs in this package. Any
bug reports, complaints, kudos, or suggestion are welcome. Please
note that my telephone is VOICE in the DAY and EVENING, and BBS from
MIDNIGHT UNTIL 0700 EASTERN TIME DAILY, however if I'm here and you
need access in the daytime, I'll be happy to crank it up for you!
-eof-